/*
	object with standard interface to set control values in case some controls (buttons, etc), take different values

*/


ControlValueSetter{

	var ctrl;

	*new{|ctrlArg|
		^super.new.init(ctrlArg);
	}
	
	init{|ctrlArg|
		ctrl = ctrlArg;
	}
	
	setValue{|val|
		{ ctrl.value_(val)  }.defer;		
	}
	
	value_{|val|
		this.setValue(val);
	}

}

FeedbackValueSetter : ControlValueSetter{

	setValue{|value|
		{ctrl.feedBackValue_([value])}.defer;
	}
}

RandValueSetter : ControlValueSetter{	
	setValue{|val|
		{ ctrl.randBoxValue_(val)  }.defer;		
	}
}
